package aynu.hd.Hotel.Controller;

import aynu.hd.Hotel.Service.userService;
import aynu.hd.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("user")
public class userController {
    @Autowired
    userService userService;

    //更新个人信息
    @PostMapping("userUpdate")
    @ResponseBody
    public String userUpdate(User user, HttpSession session) {
        String data = userService.userUpdate(user, session);
        return data;
    }
}
